<?php
defined('BASEPATH') OR exit('No direct script access allowed');
    class user_address_model extends CI_Model{
        public $table_name='user_address';
        public function get_user_all_address($user_id){
            $query=$this->db->where('user_id',$user_id)->get($this->table_name);
            return $query->result();
        }
        public function add_one_address($name,$address,$phone,$user_id){
            $this->db->insert($this->table_name,array(
                'name'=>$name,
                'address'=>$address,
                'phone'=>$phone,
                'user_id'=>$user_id
            ));
        }

    }